import React from 'react';
import {
  StyleSheet,
  View,
  Text,
  ActivityIndicator
} from 'react-native';
 
export default class Loading extends React.Component {
  render() {
    return (
      <View style={[styles.container]}>
        <View style={styles.loading}>
          <ActivityIndicator color="white"/>
          <Text style={styles.loadingTitle}>加载中……</Text>
        </View>
      </View>
    )
  }
}
 
const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  loading: {
    backgroundColor: '#999',
    height: 100,
    width: 140,
    borderRadius: 10,
    padding: 20
  },
  loadingTitle: {
    textAlign: 'center',
    marginTop: 20,
    fontSize: 14,
    color: 'white'
  }
})
